﻿using System;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using JM.JCY.Proxy;
using JM.JCY.BusinessEntity.DSJCYD94;

namespace JM.JCY.SharePointComponent.CaseManagement.CaseAllProcess
{
    public partial class CaseAllProcessUserControl : UserControl
    {
        protected void Page_Load(object sender, EventArgs e)
        {
        }

        protected void imgSubmit_Click(object sender, ImageClickEventArgs e)
        {
            GridViewDataBind();
        }

       

        protected void gvCaseWarning_PageIndexChanging(object sender, GridViewPageEventArgs e)
        {
            this.gvCaseWarning.PageIndex = e.NewPageIndex;
            GridViewDataBind();
        }

        private void GridViewDataBind()
        {
            string AJJD = ddlSearch.SelectedIndex == 0 ? string.Empty : ddlSearch.SelectedValue;
            using (DSJCYD94Proxy proxy = new DSJCYD94Proxy())
            {
                CaseManagementDataSet.T_AJGL_AJJK_QLCAJDataTable dt = proxy.GetFullFlowCase(AJJD);
               if(dt.Rows.Count > 0)
                   this.NoRecord.Visible = false;
               else
                   this.NoRecord.Visible = true;
               this.gvCaseWarning.DataSource = dt;
               this.gvCaseWarning.DataBind();
                
            }
        }
    }
}
